package example

import "gorm.io/gorm"

type Category struct {
	gorm.Model
	Name string `gorm:"type:varchar(255);not null;uniqueIndex" amis:"label:名称;validations:isRequired"`
}

func (c Category) PK() uint {
	return c.ID
}

type Todo struct {
	gorm.Model
	Title      string
	CategoryID uint
}

func (c Todo) GetID() uint {
	return c.ID
}
